// Copyright by Jean Bean, 2024

#pragma once

#include "CoreMinimal.h"
#include "LineReplicationGraphSetting.generated.h"

UCLASS(Config=LineReplicationGraphSetting, DefaultConfig,configdonotcheckdefaults)
class LINEREPLICATIONGRAPH_API ULineReplicationGraphSetting : public UDeveloperSettings
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintCallable)
	static const ULineReplicationGraphSetting* Get()
	{
		return GetDefault<ULineReplicationGraphSetting>();
	}
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float GridCellSize = 4800;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FVector2D SpatialBias = FVector2D(-300000, -300000);	//基准值，可以理解为最小值
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float PawnCullDistance = 6400;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float DestructionInfoMaxDist = 15000;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool DisplayClientLevelStreaming = false;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool ReplicationGraphDebugCellChange = false;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int ReplicationGraphPrintCellCountInternal = 600;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool ReplicationGraphDebugActor = false;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	bool ReplicationMarkPawnGridCoord = false;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 CellCacheRange = 3;	//缓冲周围的格子,用于快速查找周围的格子

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Debug)
	bool EnableDebug = false;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Debug)
	float DebugInternalSeconds = 1;
};